<template>
    <div class="page-top">
        <div class="page-top-left">
            <img src="../assets/logo.png" ref="logo">
            <i class="fa fa-align-justify" @click="info.isCollapse=!info.isCollapse"></i>
        </div>
        <div class="page-top-right">
            欢迎您管理员&nbsp; 
            <el-dropdown>
            <span class="el-dropdown-link">
                个人<i class="el-icon-arrow-down el-icon--right"></i>
            </span>
            <el-dropdown-menu slot="dropdown">
                <el-dropdown-item>消息中心</el-dropdown-item>
                <el-dropdown-item>设置</el-dropdown-item>
                <el-dropdown-item @click.native="exit">退出</el-dropdown-item>
            </el-dropdown-menu>
            </el-dropdown>
        </div>
    </div>
</template>
<script>
import api from '../api'
    export default{
        props:['info'],
        data(){
            return {

            }
        },
        methods:{
            exit(){
                api.$http("/sysDoExit",{},function(err,res){
                    console.log(res.data);
                    if(res.data.code==1){
                        this.$message({
                            message: "退出成功",
                            type: 'success'
                        });
                        this.$router.push({path:"/system/login"});
                    }
                }.bind(this));
            }
        },
        mounted(){
            
        }
    }
</script>
